package goodbaby.dklt;

import android.app.Application;

import com.classic.core.utils.DeviceUtil;
import com.classic.core.utils.SDcardUtils;
import com.classic.core.utils.ScreenUtil;
import com.classic.okhttp.gbb.http.ActionHelp;

import cn.jpush.android.api.JPushInterface;
import goodbaby.dklt.bean.AttendanceClassBean;
import goodbaby.dklt.bean.AttendanceSchoolBean;
import goodbaby.dklt.customerview.ImageLoaderUtil;

/**
 * Created by Jayden on 2016/4/18.
 */
public class GbbApplication extends Application {
    private static AttendanceClassBean attendanceClassBean;
    private static AttendanceSchoolBean attendanceSchoolBean;

    @Override
    public void onCreate() {
        super.onCreate();
        //sd卡初始化
        SDcardUtils.init();
        //初始化屏幕数据
        ScreenUtil.GetInfo(this);
        ImageLoaderUtil.initImageLoader(this, null);
        GbbCache.setContext(this);
        ActionHelp.init(String.valueOf(DeviceUtil.getInstance(this)), "", false);//true:商用  false:商测

        JPushInterface.setDebugMode(true);    // 设置开启日志,发布时请关闭日志
        JPushInterface.init(this);            // 初始化 JPush
    }

    public static AttendanceSchoolBean getAttendanceSchoolBean() {
        return attendanceSchoolBean;
    }

    public static void setAttendanceSchoolBean(AttendanceSchoolBean bean) {
        attendanceSchoolBean = bean;
    }

    public static AttendanceClassBean getAttendanceClassBean() {
        return attendanceClassBean;
    }

    public static void setAttendanceClassBean(AttendanceClassBean bean) {
        attendanceClassBean = bean;
    }
}
